package com.ruoyi.system.service.impl;

import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiExtcontactListRequest;
import com.ruoyi.system.domain.invoice.DingUser;
import com.ruoyi.system.service.IDingUserService;

import java.util.List;

public class DingUserService  implements IDingUserService {
    /**
     * @param pageSize
     * @param offset
     * @return
     */
    @Override
    public List<DingUser> getExContactList(Integer pageSize, Integer offset) {
        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/extcontact/list");
        OapiExtcontactListRequest req = new OapiExtcontactListRequest();
        req.setSize(20L);
        req.setOffset(0L);
//        OapiExtcontactListResponse rsp = client.execute(req, DingTokenUtils.loadToken());
//        System.out.println(rsp.getBody());
        return null;
    }
}
